草庐IT

python - Google API quickstart.py 错误 KeyError : \'_module\'

全部标签

go - 构建命令行参数 : cannot load local package: cannot find module providing package

我无法使用gomod加载本地包。我有单独的go.mod文件用于repoA和repoB。我在任何地方都找不到解决方案。操作系统是windows。$>goversiongoversiongo1.12.7windows/amd64当我从repoA运行主文件时,我有两个带有存储库的模块。它将尝试查找repoB的模块/包,然后抛出一个错误提示cannotfindmoduleprovidingpackage我的repo结构:-����repoA�����proto������system�����sauth�����shandle�����smodel�����sresponse����repoB

go - 使用 GO111MODULE 安装 buffalo 导致 go get : error loading module requirements

这个问题在这里已经有了答案:GO111MODULE=on(errorloadingmodulerequirements)(1个回答)关闭3年前。我在尝试安装buffalo时遇到错误。我在goversiongo1.12.7linux/amd64上使用干净的GOPATH进行了测试,其中没有任何内容。GO111MODULE设置为on。我尝试使用网站上给出的命令安装buffalo:goget-u-vgithub.com/gobuffalo/buffalo/buffalo执行命令导致返回代码1,详细输出末尾的错误消息似乎是goget:errorloadingmodulerequirements。

google-app-engine - 具有运行时 go111 url 调度问题的 dev_appserver.py

我仍在努力让我的旧式应用引擎至少在go111下工作(由于依赖于内存缓存,go112将无法工作)。我现在正在为我的静态文件的app.yaml配置问题绊倒,我之前使用了一个完全静态的目录布局,只是在根目录中指定了一些动态处理程序,如下所示:runtime:go111handlers:-url:/_ah/.*script:autologin:adminsecure:always-url:/dynamicscript:autosecure:always-url:/admin/.*script:autologin:adminsecure:always-url:(.*)/static_files:

go build 错误 .go/src for go/src 在寻找依赖

我正在尝试安装packagefromgithub.报告的错误显示gobuild在/go/src而不是.go/src中查找源文件(=$GOPATH)。在错误消息中查找/home/er/go/src/。我该如何解决这个问题?~/.go/src/netbackup$echo$GOPATH/home/er/.go~/.go/src/netbackup$goversiongoversiongo1.10.4linux/amd64~/.go/src/netbackup$sudogobuildmain.go:17:2:cannotfindpackage"github.com/marcopaganini

由于 : "go directory outside available modules",Docker 构建失败

我在构建我的go服务的Docker镜像时遇到问题(请参阅最后的错误消息)。我的服务代码结构如下:cmd-duc-adobepkg-adobe-common.gitignoreDockerfilego.modgo.sum这是我的Dockerfile:#buildimageFROMgolang:1.12-alpineasbuilderRUNapkupdate&&apkadd--no-cachegitca-certificates&&update-ca-certificatesWORKDIR/app#firstdownloaddependenciessothatwecanutilizethe

go - 在 Go 中关闭 grpc 服务器时如何检测错误?

我正在尝试在GogRPC客户端代码中检测gRPC服务器关闭import(pb"mysample.com/api/rpc""google.golang.org/grpc")varstreampb.SearchProductService_MarketStreamClientfor{r,err:=stream.Recv()iferr==io.EOF{log.Println("Info:serverclose")break}elseiferr!=nil{log.Println("Err:grpccode:",grpc.Code(err))iferr!=nil{log.Fatal(err)}}

go - 如何修复 gomod : `github.com/stretchrcom/testify@v1.4.0: parsing go.mod: unexpected module path "github. com/strethr/testify"`

当我执行gomodtidy时。我收到以下错误:go:github.com/stretchrcom/testify@v1.4.0:parsinggo.mod:unexpectedmodulepath"github.com/stretchr/testify" 最佳答案 此错误是由于在将testify移动到github.com/stretchr/testify之前引用testify的包造成的。解决方案是在您的go.mod中添加以下行:替换github.com/stretchrcom/testifyv1.4.0=>github.com/st

go - 来自 xx.xx.xx.xx :14333: EOF 的 TLS 握手错误

我在Linux(RHEL7)中运行HTTPS服务器。我一启动服务器就收到以下错误。2019/09/0415:46:16http:TLShandshakeerrorfromxx.xx.xx.xx:60206:EOF2019/09/0415:46:21http:TLShandshakeerrorfromxx.xx.xx.xx:31824:EOF此错误在终端中自动且持续出现。下面是创建https服务器的代码-packagemainimport("fmt""net/http""github.com/gin-gonic/gin")funcmain(){fmt.Println("Startingw

go - 有没有一种方法可以在 Go 中生成类似于 Python 的 `secrets` 模块的加密强随机数?

这个问题在这里已经有了答案:HowtogeneratearandomstringofafixedlengthinGo?(18个答案)HowtogenerateuniquerandomstringinalengthrangeusingGolang?(1个回答)HowtogenerateuniquerandomalphanumerictokensinGolang?(3个答案)HowtogenerateafixedlengthrandomnumberinGo?(4个答案)EfficientwaytotogeneratearandomHexstringofafixedlengthinGolan

makefile - 安装 web.go 错误

我正在尝试安装web.go。我得到了源代码并运行了make,但我收到了这些错误:g-o_go_.6cookie.gofcgi.gorequest.goscgi.goservefile.gostatus.goweb.gocookie.go:33:c.Versionundefined(type*http.CookiehasnofieldormethodVersion)cookie.go:34:c.Versionundefined(type*http.CookiehasnofieldormethodVersion)cookie.go:54:c.Commentundefined(type*ht